#!/bin/bash

# 18612345678 --> 186-1234-5678

phone=$1
p1=$(head -c3 <<<"$phone")
p2=$(head -c7 <<<"$phone" | tail -c4)
p3=$(head -c11 <<<"$phone" | tail -c4)
# p1=${phone:0:3}
# p2=${phone:3:4}
# p3=${phone:7:4}
echo "$p1-$p2-$p3"
